package list;

import com.google.common.collect.Sets;
import org.junit.Test;

import java.util.*;

/**
 * @author
 * @Title: TestSet
 * @Description:
 * @date 2022/5/26 8:55 下午
 */
public class TestSet {

    @Test
    public void test01(){
        Set<String> set = Sets.newHashSet();
        set.add("a");
        set.add("a");
        set.add("b");
        System.out.println(set);
    }

    @Test
    public void test02(){
        List<String> list = Arrays.asList("a","b","c","b");
        list = new ArrayList(new LinkedHashSet<>(list));
        System.out.println(list);
    }

}
